{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/containers/GetUserDialog.tsx\",\n  _s = $RefreshSig$();\nimport React from 'react';\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../index\";\nimport { GetUserDialog as GetUserDialogComponent } from \"../components\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nconst GetUserDialog = props => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const handleOnClick = () => {\n    store.getDialogOrNewFromAPI(props.profile).then(chat => {\n      store.setCurrentDialog({\n        ...store.getCurrentDialog(),\n        ...chat\n      });\n      store.setViewedDialogId({\n        ...store.getViewedDialogId(),\n        ...chat.id\n      });\n    });\n  };\n  if (!props.selfProfile) {\n    return /*#__PURE__*/_jsxDEV(GetUserDialogComponent, {\n      callback: handleOnClick\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 25,\n      columnNumber: 13\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(_Fragment, {}, void 0, false);\n  }\n};\n_s(GetUserDialog, \"fWWYyndAah+pK9pcP7nWnrsVVfw=\");\n_c = GetUserDialog;\nexport default _c2 = observer(GetUserDialog);\nvar _c, _c2;\n$RefreshReg$(_c, \"GetUserDialog\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","observer","Context","GetUserDialog","GetUserDialogComponent","props","store","useContext","handleOnClick","getDialogOrNewFromAPI","profile","then","chat","setCurrentDialog","getCurrentDialog","setViewedDialogId","getViewedDialogId","id","selfProfile"],"sources":["/data/messenger.client/src/containers/GetUserDialog.tsx"],"sourcesContent":["import React from 'react';\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../index\";\nimport {GetUserDialog as GetUserDialogComponent} from \"../components\";\nimport {UserProfileProps} from \"../models/props/UserProfileProps\";\n\nconst GetUserDialog: React.FC<UserProfileProps> = (props) => {\n    const {store} = React.useContext(Context);\n\n    const handleOnClick = () => {\n        store.getDialogOrNewFromAPI(props.profile).then((chat) => {\n            store.setCurrentDialog({\n                ...store.getCurrentDialog(),\n                ...chat\n            });\n            store.setViewedDialogId({\n                ...store.getViewedDialogId(),\n                ...chat.id\n            });\n        });\n    }\n\n    if (!props.selfProfile) {\n        return (\n            <GetUserDialogComponent callback={handleOnClick} />\n        );\n    } else {\n        return (<></>);\n    }\n}\n\nexport default observer(GetUserDialog);"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,UAAU;AAChC,SAAQC,aAAa,IAAIC,sBAAsB,QAAO,eAAe;AAAC;AAAA;AAGtE,MAAMD,aAAyC,GAAIE,KAAK,IAAK;EAAA;EACzD,MAAM;IAACC;EAAK,CAAC,GAAGN,KAAK,CAACO,UAAU,CAACL,OAAO,CAAC;EAEzC,MAAMM,aAAa,GAAG,MAAM;IACxBF,KAAK,CAACG,qBAAqB,CAACJ,KAAK,CAACK,OAAO,CAAC,CAACC,IAAI,CAAEC,IAAI,IAAK;MACtDN,KAAK,CAACO,gBAAgB,CAAC;QACnB,GAAGP,KAAK,CAACQ,gBAAgB,EAAE;QAC3B,GAAGF;MACP,CAAC,CAAC;MACFN,KAAK,CAACS,iBAAiB,CAAC;QACpB,GAAGT,KAAK,CAACU,iBAAiB,EAAE;QAC5B,GAAGJ,IAAI,CAACK;MACZ,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC;EAED,IAAI,CAACZ,KAAK,CAACa,WAAW,EAAE;IACpB,oBACI,QAAC,sBAAsB;MAAC,QAAQ,EAAEV;IAAc;MAAA;MAAA;MAAA;IAAA,QAAG;EAE3D,CAAC,MAAM;IACH,oBAAQ,qCAAK;EACjB;AACJ,CAAC;AAAA,GAvBKL,aAAyC;AAAA,KAAzCA,aAAyC;AAyB/C,qBAAeF,QAAQ,CAACE,aAAa,CAAC;AAAC;AAAA;AAAA"},"metadata":{},"sourceType":"module"}